<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>
  Exception: Prismic::Error
  
    &mdash; Documentation by YARD 0.8.7.4
  
</title>

  <link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />

  <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />

<script type="text/javascript" charset="utf-8">
  hasFrames = window.top.frames.main ? true : false;
  relpath = '../';
  framesUrl = "../frames.html#!Prismic/Error.html";
</script>


  <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>

  <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>


  </head>
  <body>
    <div id="header">
      <div id="menu">
  
    <a href="../_index.html">Index (E)</a> &raquo;
    <span class='title'><span class='object_link'><a href="../Prismic.html" title="Prismic (module)">Prismic</a></span></span>
     &raquo; 
    <span class="title">Error</span>
  

  <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
</div>

      <div id="search">
  
    <a class="full_list_link" id="class_list_link"
        href="../class_list.html">
      Class List
    </a>
  
    <a class="full_list_link" id="method_list_link"
        href="../method_list.html">
      Method List
    </a>
  
    <a class="full_list_link" id="file_list_link"
        href="../file_list.html">
      File List
    </a>
  
</div>
      <div class="clear"></div>
    </div>

    <iframe id="search_frame"></iframe>

    <div id="content"><h1>Exception: Prismic::Error
  
  
  
</h1>

<dl class="box">
  
    <dt class="r1">Inherits:</dt>
    <dd class="r1">
      <span class="inheritName">Exception</span>
      
        <ul class="fullTree">
          <li>Object</li>
          
            <li class="next">Exception</li>
          
            <li class="next">Prismic::Error</li>
          
        </ul>
        <a href="#" class="inheritanceTree">show all</a>
      
      </dd>
    
  
  
    
  
    
  
  
  
    <dt class="r2 last">Defined in:</dt>
    <dd class="r2 last">lib/prismic.rb</dd>
  
</dl>
<div class="clear"></div>

<h2>Overview</h2><div class="docstring">
  <div class="discussion">
    <p>These exception can contains an error cause and is able to show them</p>


  </div>
</div>
<div class="tags">
  

</div><div id="subclasses">
  <h2>Direct Known Subclasses</h2>
  <p class="children"><span class='object_link'><a href="API/BadPrismicResponseError.html" title="Prismic::API::BadPrismicResponseError (class)">API::BadPrismicResponseError</a></span>, <span class='object_link'><a href="API/PrismicWSAuthError.html" title="Prismic::API::PrismicWSAuthError (class)">API::PrismicWSAuthError</a></span>, <span class='object_link'><a href="API/PrismicWSConnectionError.html" title="Prismic::API::PrismicWSConnectionError (class)">API::PrismicWSConnectionError</a></span>, <span class='object_link'><a href="Fragments/Image/ViewDoesNotExistException.html" title="Prismic::Fragments::Image::ViewDoesNotExistException (class)">Fragments::Image::ViewDoesNotExistException</a></span>, <span class='object_link'><a href="SearchForm/AuthenticationException.html" title="Prismic::SearchForm::AuthenticationException (class)">SearchForm::AuthenticationException</a></span>, <span class='object_link'><a href="SearchForm/AuthorizationException.html" title="Prismic::SearchForm::AuthorizationException (class)">SearchForm::AuthorizationException</a></span>, <span class='object_link'><a href="SearchForm/FormSearchException.html" title="Prismic::SearchForm::FormSearchException (class)">SearchForm::FormSearchException</a></span>, <span class='object_link'><a href="SearchForm/NoRefSetException.html" title="Prismic::SearchForm::NoRefSetException (class)">SearchForm::NoRefSetException</a></span>, <span class='object_link'><a href="SearchForm/RefNotFoundException.html" title="Prismic::SearchForm::RefNotFoundException (class)">SearchForm::RefNotFoundException</a></span>, <span class='object_link'><a href="SearchForm/UnsupportedFormKind.html" title="Prismic::SearchForm::UnsupportedFormKind (class)">SearchForm::UnsupportedFormKind</a></span></p>
</div>




  <h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
  <ul class="summary">
    
      <li class="public ">
  <span class="summary_signature">
    
      <a href="#cause-instance_method" title="#cause (instance method)">- (Object) <strong>cause</strong> </a>
    

    
  </span>
  
  
  
    
      <span class="note title readonly">readonly</span>
    
    
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>Returns the value of attribute cause.</p>
</div></span>
  
</li>

    
  </ul>




  
    <h2>
      Instance Method Summary
      <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
    </h2>

    <ul class="summary">
      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#full_trace-instance_method" title="#full_trace (instance method)">- (String) <strong>full_trace</strong>(e = self) </a>
    

    
  </span>
  
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>Return the full trace of the error (including nested errors).</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#initialize-instance_method" title="#initialize (instance method)">- (Error) <strong>initialize</strong>(msg = nil, cause = nil) </a>
    

    
  </span>
  
  
    <span class="note title constructor">constructor</span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>A new instance of Error.</p>
</div></span>
  
</li>

      
    </ul>
  


  <div id="constructor_details" class="method_details_list">
  <h2>Constructor Details</h2>
  
    <div class="method_details first">
  <h3 class="signature first" id="initialize-instance_method">
  
    - (<tt><span class='object_link'><a href="" title="Prismic::Error (class)">Error</a></span></tt>) <strong>initialize</strong>(msg = nil, cause = nil) 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    <p>Returns a new instance of Error</p>


  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


19
20
21
22</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/prismic.rb', line 19</span>

<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_msg'>msg</span><span class='op'>=</span><span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_cause'>cause</span><span class='op'>=</span><span class='kw'>nil</span><span class='rparen'>)</span>
  <span class='id identifier rubyid_msg'>msg</span> <span class='op'>?</span> <span class='kw'>super</span><span class='lparen'>(</span><span class='id identifier rubyid_msg'>msg</span><span class='rparen'>)</span> <span class='op'>:</span> <span class='id identifier rubyid_msg'>msg</span>
  <span class='ivar'>@cause</span> <span class='op'>=</span> <span class='id identifier rubyid_cause'>cause</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
  
</div>

  <div id="instance_attr_details" class="attr_details">
    <h2>Instance Attribute Details</h2>
    
      
      <span id=""></span>
      <div class="method_details first">
  <h3 class="signature first" id="cause-instance_method">
  
    - (<tt>Object</tt>) <strong>cause</strong>  <span class="extras">(readonly)</span>
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    <p>Returns the value of attribute cause</p>


  </div>
</div>
<div class="tags">
  

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


18
19
20</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/prismic.rb', line 18</span>

<span class='kw'>def</span> <span class='id identifier rubyid_cause'>cause</span>
  <span class='ivar'>@cause</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
  </div>


  <div id="instance_method_details" class="method_details_list">
    <h2>Instance Method Details</h2>

    
      <div class="method_details first">
  <h3 class="signature first" id="full_trace-instance_method">
  
    - (<tt>String</tt>) <strong>full_trace</strong>(e = self) 
  

  

  
</h3><div class="docstring">
  <div class="discussion">
    <p>Return the full trace of the error (including nested errors)</p>


  </div>
</div>
<div class="tags">
  <p class="tag_title">Parameters:</p>
<ul class="param">
  
    <li>
      
        <span class='name'>e</span>
      
      
        <span class='type'>(<tt>Exception</tt>)</span>
      
      
        <em class="default">(defaults to: <tt>self</tt>)</em>
      
      
        &mdash;
        <div class='inline'><p>Parent error (for internal use)</p>
</div>
      
    </li>
  
</ul>

<p class="tag_title">Returns:</p>
<ul class="return">
  
    <li>
      
      
        <span class='type'>(<tt>String</tt>)</span>
      
      
      
        &mdash;
        <div class='inline'><p>The trace</p>
</div>
      
    </li>
  
</ul>

</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


28
29
30
31
32
33
34
35
36</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/prismic.rb', line 28</span>

<span class='kw'>def</span> <span class='id identifier rubyid_full_trace'>full_trace</span><span class='lparen'>(</span><span class='id identifier rubyid_e'>e</span><span class='op'>=</span><span class='kw'>self</span><span class='rparen'>)</span>
  <span class='id identifier rubyid_first'>first</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_backtrace'>backtrace</span> <span class='op'>=</span> <span class='id identifier rubyid_e'>e</span><span class='period'>.</span><span class='id identifier rubyid_backtrace'>backtrace</span>
  <span class='id identifier rubyid_msg'>msg</span> <span class='op'>=</span> <span class='id identifier rubyid_e'>e</span> <span class='op'>==</span> <span class='kw'>self</span> <span class='op'>?</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_end'>&quot;</span></span> <span class='op'>:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Caused by </span><span class='tstring_end'>&quot;</span></span>
  <span class='id identifier rubyid_msg'>msg</span> <span class='op'>+=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_first'>first</span><span class='embexpr_end'>}</span><span class='tstring_content'>: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_e'>e</span><span class='period'>.</span><span class='id identifier rubyid_message'>message</span><span class='embexpr_end'>}</span><span class='tstring_content'> (</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_e'>e</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='embexpr_end'>}</span><span class='tstring_content'>)</span><span class='tstring_end'>&quot;</span></span>
  <span class='id identifier rubyid_stack'>stack</span> <span class='op'>=</span> <span class='id identifier rubyid_backtrace'>backtrace</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_s'>s</span><span class='op'>|</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>\tfrom </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_s'>s</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span> <span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>\n</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
  <span class='id identifier rubyid_cause'>cause</span> <span class='op'>=</span> <span class='id identifier rubyid_e'>e</span><span class='period'>.</span><span class='id identifier rubyid_respond_to?'>respond_to?</span><span class='lparen'>(</span><span class='symbol'>:cause</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='id identifier rubyid_e'>e</span><span class='period'>.</span><span class='id identifier rubyid_cause'>cause</span> <span class='op'>:</span> <span class='kw'>nil</span>
  <span class='id identifier rubyid_cause_stack'>cause_stack</span> <span class='op'>=</span> <span class='id identifier rubyid_cause'>cause</span> <span class='op'>?</span> <span class='id identifier rubyid_full_trace'>full_trace</span><span class='lparen'>(</span><span class='id identifier rubyid_cause'>cause</span><span class='rparen'>)</span> <span class='op'>:</span> <span class='kw'>nil</span>
  <span class='lbracket'>[</span><span class='id identifier rubyid_msg'>msg</span><span class='comma'>,</span> <span class='id identifier rubyid_stack'>stack</span><span class='comma'>,</span> <span class='id identifier rubyid_cause_stack'>cause_stack</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_compact'>compact</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>\n</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
<span class='kw'>end</span></pre>
    </td>
  </tr>
</table>
</div>
    
  </div>

</div>

    <div id="footer">
  Generated on Tue Sep 27 10:47:05 2016 by
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
  0.8.7.4 (ruby-2.0.0).
</div>

  </body>
</html>